import axios from '@/api/fetch';
import SERVER from '@/api/server';


//皮卡-备件提报单查询-审核页面
export const queryPartBuyCheck = params => axios.get(`${SERVER.CMSCLOUD_WMS}/aduit/order`, { params });

export const queryPartBoBuyCheck = params => axios.get(`${SERVER.CMSCLOUD_WMS}/aduit/bo/order`, { params });

//皮卡-备件提报单查询-查询页面
export const queryPartOnlySelect = params => axios.get(`${SERVER.CMSCLOUD_WMS}/aduit/order/onlySelect`, { params });



//皮卡-备件提报单明细查询
export const partbuyStockInItemOEM = params => {
  return axios.get(`${SERVER.CMSCLOUD_WMS}/aduit/order/selectOrderDetail`, { params });
};

//皮卡-审核
export const auditOrder = params => {
  return axios.post(`${SERVER.CMSCLOUD_WMS}/aduit/order/auditOrder`,  params );
};

//皮卡-审核
export const auditBoOrder = params => {
  return axios.post(`${SERVER.CMSCLOUD_WMS}/aduit/bo/order/auditOrder`,  params );
};

//皮卡-审核
export const pushBoOrder = params => {
  return axios.post(`${SERVER.CMSCLOUD_WMS}/aduit/bo/order/pushBoOrder`,  params );
};

//皮卡-备件提报审核过程明细
export const aduitPocess = params => {
  return axios.get(`${SERVER.CMSCLOUD_WMS}/aduit/order/aduitPocess`, { params });
};

export const aduitBoPocess = params => {
  return axios.get(`${SERVER.CMSCLOUD_WMS}/aduit/bo/order/aduitPocess`, { params });
};
export const getListForExport = params => {
  return axios.get(`${SERVER.CMSCLOUD_WMS}/aduit/order/getListForExport`, {
    params,
    responseType: 'blob'
  });
}
export const exporturl = params => axios.post(`/api/cmscloud.excel/downloadExcel/exportExcel/${params.CODE}`, params);
//自动审单编辑
export const autoAuditOrderSwitchFuc = params => axios.get(`${SERVER.CMSCLOUD_WMS}/aduit/order/autoAuditOrderSwitchFuc/`+params);
//自动审单查询
export const findAutoAuditOrder = () => axios.get(`${SERVER.CMSCLOUD_WMS}/aduit/order/findAutoAuditOrder/`);

// 查询库存
export const queryStock = (params) => axios.post(`${SERVER.CMSCLOUD_WMS}/delivertosap/traceOrde/asnyPartStore2dlr`, params)

